home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINSYSTM / WMB009A1.ZIP / WW0654.TX_ / WW0654.TXT
Text File  |  1993-02-22  |  45KB  |  1,063 lines

  1. ======================================================================
  2.   Microsoft(R) Product Support Services Application Note (Text File)
  3.              WW0654: WINDOWS 3.1 AND SERIAL COMMUNICATIONS
  4. ======================================================================
  5.                                                   Revision Date: 2/93
  6.                                                       No Disk Included
  7.  
  8. The following information applies to Microsoft Windows(TM) version
  9. 3.1.
  10.  
  11.  --------------------------------------------------------------------
  12. | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY    |
  13. | ACCOMPANY THIS DOCUMENT (collectively referred to as an            |
  14. | Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY      |
  15. | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO    |
  16. | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A     |
  17. | PARTICULAR PURPOSE. The user assumes the entire risk as to the     |
  18. | accuracy and the use of this Application Note. This Application    |
  19. | Note may be copied and distributed subject to the following        |
  20. | conditions: 1) All text must be copied without modification and    |
  21. | all pages must be included; 2) If software is included, all files  |
  22. | on the disk(s) must be copied without modification [the MS-DOS(R)  |
  23. | utility DISKCOPY is appropriate for this purpose]; 3) All          |
  24. | components of this Application Note must be distributed together;  |
  25. | and 4) This Application Note may not be distributed for profit.    |
  26. |                                                                    |
  27. | Copyright 1992 Microsoft Corporation. All Rights Reserved.         |
  28. | Microsoft and MS-DOS are registered trademarks and Windows         |
  29. | is a trademark of Microsoft Corporation.                           |
  30. | IBM, Micro Channel, and PS/2 are registered trademarks of          |
  31. | International Business Machines Corporation.                       |
  32. | Logitech is a trademark of Logitech, Inc.                          |
  33.  --------------------------------------------------------------------
  34.  
  35.                              INTRODUCTION
  36.                              ============
  37.                                    
  38. This application note provides information about serial communications
  39. in the Microsoft Windows version 3.1 operating system environment. The
  40. first section, "What's New in Windows Version 3.1," gives an overview
  41. of improvements in Windows 3.1. The section "Conceptual Overview"
  42. explains basic and advanced concepts in serial communications,
  43. including port addresses, device contention, and so forth. The section
  44. "Why Conflicts Occur" discusses the most common reasons why you may
  45. experience difficulties with serial communications, and the section
  46. "How to Resolve Conflicts" explains what to do once you have
  47. identified the problem.
  48.  
  49. If you need help with a specific problem, you may want to start by
  50. reading the "Troubleshooting" section.
  51.  
  52. WHAT'S NEW IN WINDOWS VERSION 3.1
  53. =================================
  54.  
  55. Here are some highlights about improvements in how Windows 3.1 handles
  56. serial communications.
  57.  
  58. Performance Improvements
  59. ------------------------
  60.  
  61.  - Windows 3.1 supports the high-speed 16550AFN UART buffer; Windows
  62.    3.0 does not. (The 16550AFN buffer is supported for Windows-based
  63.    applications only.)
  64.  
  65.  - Windows 3.1 supports baud rates of up to 57.6K. (You may need to
  66.    update your application to take advantage of these higher baud
  67.    rates.) Some users experienced lockups during high-speed, full-
  68.    duplex transfers while using Windows 3.0. These problems are
  69.    resolved in Windows 3.1.
  70.  
  71.  - Windows 3.1 has a new serial driver interface that allows data to
  72.    be passed in blocks, instead of one character at a time. (Each
  73.    block is treated as a single character.) This means faster data
  74.    throughput and fewer transmission errors. Windows 3.0 passes data
  75.    one character at a time.
  76.  
  77.  - Windows 3.0 uses a "constant polling" method to determine when
  78.    serial ports are occupied. Windows 3.1 uses the
  79.    EnableCommNotification API; this enables applications to directly
  80.    notify Windows of serial events, thereby increasing overall system
  81.    performance.
  82.  
  83. Better Support for Your Ports
  84. -----------------------------
  85.  
  86.  - Windows 3.1 provides better support for COM ports 3 and 4. You can
  87.    now configure these ports by using Windows Control Panel.
  88.  
  89.  - Windows 3.1 fully supports IRQ sharing; Windows 3.0 does not. (To
  90.    take advantage of this feature, your PC must have Extended Industry
  91.    Standard Architecture (EISA) or Micro Channel(R) Architecture
  92.    (MCA), or you must have a serial I/O card that supports IRQ
  93.    sharing.)
  94.                                    
  95.                           CONCEPTUAL OVERVIEW
  96.                           ===================
  97.                                    
  98. This section provides a general introduction to the subject of serial
  99. communications and explains many of the concepts and issues that are
  100. discussed throughout the "Windows 3.1 and Serial Communications"
  101. application note.
  102.  
  103. SERIAL VS. PARALLEL PORTS
  104. =========================
  105.  
  106. Input/output (I/O) ports provide the means for your PC to send or
  107. receive data through external devices such as modems, printers, fax
  108. machines, and so forth. Virtually all PCs have both parallel and
  109. serial ports. There are several distinctions between serial and
  110. parallel I/O ports.
  111.  
  112. Parallel ports are generally used only for printers, which is where
  113. the name LPT, for line printer, originates. Parallel ports transmit
  114. data in complete bytes, and in most cases they handle outgoing data
  115. only; they cannot receive information. (The IBM[R] PS/2[R] parallel
  116. ports are bidirectional; in addition, you can use certain peripherals,
  117. such as network card adapters, to enable your ports to transmit data
  118. bidirectionally.) You do not configure parallel ports; they are
  119. preconfigured for your machine.
  120.  
  121. Serial ports are generally used for communications, or COM devices,
  122. which include serial printers, modems, fax machines, and so forth.
  123. Serial ports are capable of both sending and receiving data. You can
  124. configure settings--such as parity, stop bits, and data length--for
  125. your serial ports. (In Windows, you can specify these settings by
  126. using Control Panel.) Serial ports transmit data one bit at a time,
  127. sequentially (or serially).
  128.  
  129. PORT ADDRESSES AND IRQS
  130. =======================
  131.  
  132. Every time you start your PC, your system BIOS checks your COM ports
  133. to see what serial devices are installed on your PC and posts this
  134. information to the system BIOS data area (BDA). Windows "reads" the
  135. BDA, and uses the default interrupt request line (IRQ) for each device
  136. that is registered there. Usually, each COM port requires a unique IRQ
  137. to communicate with your PC. Certain PCs and some I/O cards support
  138. IRQ sharing.
  139.  
  140.   NOTE: Some earlier BIOS versions may not check for devices on COM
  141.   ports 3 and 4. If you have devices installed on COM port 3 or 4 and
  142.   your system BIOS does not recognize these ports, you need to
  143.   register the addresses for COM3 and COM4 by using Windows Control
  144.   Panel. This is explained in the procedure "To register a serial
  145.   device" later in this application note.
  146.  
  147. How Should My COM Ports Be Configured?
  148. --------------------------------------
  149.  
  150. Generally, PCs come with built-in ports COM1 and COM2 preset to the
  151. following values:
  152.  
  153.   Port       Address       IRQ
  154.   ----------------------------
  155.   COM1        03F8          4
  156.   COM2        02F8          3
  157.  
  158. In most cases, the default values for COM ports 1 and 2 should work
  159. for your system. You can view your COM port settings by using Windows
  160. Control Panel.
  161.  
  162. Most PCs do not have built-in ports for COM3 and COM4. The default
  163. settings for these additional ports are listed here:
  164.  
  165.   Port              Address        IRQ
  166.   ------------------------------------
  167.   COM3               03E8           4
  168.   COM3 (PS/2)        3220           3
  169.   COM4               02E8           3
  170.  
  171. Because COM1 and COM3 both use IRQ4 as the def